<!DOCTYPE html>
<html>
<head>
    <title>Решаем судоку на JavaScript</title>
    <script src="sudoku.js"></script>
    <style>
        table {
            border-collapse: collapse;
            font-family: sans-serif;
        }
        td {
            border: 1px solid grey;
            padding: 2px 5px 2px 5px;
            color: #555;
        }
        .in {
            font-weight: bold;
            color: black;
        }
        .rb {
            border-right: 2px solid black;
        }
        .bb td {
            border-bottom: 2px solid black;
        }
    </style>
</head>
<body>

<script>
/*
var in_val = [
    [0, 0, 0, 0, 0, 0, 0, 6, 0],
    [0, 5, 7, 0, 0, 0, 0, 8, 0],
    [8, 0, 0, 3, 6, 0, 4, 5, 0],
    [5, 9, 0, 0, 7, 0, 0, 0, 6],
    [0, 0, 6, 4, 5, 0, 0, 0, 7],
    [4, 0, 3, 0, 9, 6, 0, 1, 2],
    [2, 0, 0, 0, 0, 0, 9, 0, 5],
    [0, 3, 0, 1, 2, 5, 6, 7, 8],
    [0, 8, 5, 0, 0, 0, 0, 0, 4]
];
*/
/*
var in_val = [
    [0, 0, 3, 0, 0, 8, 2, 0, 4],
    [0, 2, 0, 0, 6, 4, 0, 1, 0],
    [9, 0, 0, 0, 0, 0, 0, 0, 8],
    [0, 8, 0, 0, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 6, 9, 8, 0],
    [0, 0, 0, 0, 0, 0, 5, 0, 0],
    [0, 0, 4, 9, 0, 7, 0, 3, 0],
    [8, 0, 0, 0, 0, 1, 0, 0, 0],
    [0, 7, 0, 0, 5, 0, 4, 0, 0]
];
*/
/* unsolved */
var in_val = [
    [0, 0, 0, 2, 0, 0, 7, 8, 0],
    [8, 0, 2, 0, 6, 0, 0, 5, 0],
    [0, 0, 3, 0, 8, 0, 0, 0, 2],
    [0, 3, 9, 8, 0, 0, 0, 4, 0],
    [0, 2, 0, 1, 0, 0, 0, 0, 8],
    [1, 0, 0, 0, 9, 6, 0, 0, 0],
    [0, 0, 0, 9, 0, 0, 0, 0, 7],
    [9, 4, 0, 0, 1, 0, 0, 2, 0],
    [0, 5, 1, 0, 0, 8, 4, 0, 0]
];

var backtracking_call = 0;
var sudoku = new Sudoku(in_val);
document.write(sudoku.html());
document.write('<p>Вызовы обратного поиска: '+backtracking_call+'</p>');
</script>
</body>
</html>